package com.feng.freader.view.fragment.main;

import android.content.Intent;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.feng.freader.R;
import com.feng.freader.adapter.NormalViewPagerAdapter;
import com.feng.freader.base.BaseFragment;
import com.feng.freader.base.BasePresenter;
import com.feng.freader.rewrite.TabLayout;
import com.feng.freader.util.NetUtil;
import com.feng.freader.view.activity.AllNovelActivity;
import com.feng.freader.view.activity.MediationSplashActivity;
import com.feng.freader.view.activity.SearchActivity;
import com.feng.freader.view.cat.IndexActivity;
import com.feng.freader.view.cat.Surface_view;
import com.feng.freader.view.fragment.discovery.FemaleFragment;
import com.feng.freader.view.fragment.discovery.MaleFragment;
import com.feng.freader.view.fragment.discovery.PressFragment;
import com.feng.freader.view.game_2048.MainActivity;
import com.feng.freader.view.pintu.WelcomePage;
import com.feng.freader.widget.DiscoveryPageTransformer;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Feng Zhaohao
 * Created on 2019/10/20
 */
public class GameFragment extends BaseFragment implements View.OnClickListener{

    private static final String TAG = "fzh";
    private Button btn_2048;
    private Button btn_cat;
    private Button btn_ooxx;
    private Button btn_sudo;
    private Button btn_pintu;

    @Override
    protected void doInOnCreate() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_discovery_game;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {
        btn_2048 = getActivity().findViewById(R.id.button_2048);
        btn_cat = getActivity().findViewById(R.id.button_cat);
        btn_ooxx = getActivity().findViewById(R.id.button_ooxx);
        btn_sudo = getActivity().findViewById(R.id.button_sudo);
        btn_pintu = getActivity().findViewById(R.id.button_pintu);
        btn_2048.setOnClickListener(this);
        btn_cat.setOnClickListener(this);
        btn_ooxx.setOnClickListener(this);
        btn_sudo.setOnClickListener(this);
        btn_pintu.setOnClickListener(this);
    }

    @Override
    protected BasePresenter getPresenter() {
        return null;
    }

    @Override
    protected boolean isRegisterEventBus() {
        return false;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.button_2048:
                Intent intent = new Intent(getActivity(), MainActivity.class);
                startActivity(intent);
                break;
            case R.id.button_cat:
                Intent intent3 = new Intent(getActivity(), IndexActivity.class);
                startActivity(intent3);
                break;
            case R.id.button_ooxx:
                Intent intent4 = new Intent(getActivity(), com.feng.freader.view.ooxx.MainActivity.class);
                startActivity(intent4);
                break;
            case R.id.button_sudo:
                Intent intent31 = new Intent(getActivity(), com.feng.freader.view.sudo.activity.MainActivity.class);
                startActivity(intent31);
                break;
            case R.id.button_pintu:
                Intent intent32 = new Intent(getActivity(), WelcomePage.class);
                startActivity(intent32);
                break;
            default:
                break;
        }
    }

}
